package cn.agiledata.bank.common.service.email;

import java.util.Calendar;
import java.util.Date;
import java.util.Map;

import cn.agiledata.bank.common.service.NotifyMail;
import cn.agiledata.bank.common.util.DateUtil;
import cn.agiledata.bank.hibernateBean.Account;
import cn.agiledata.bank.hibernateBean.ScoresHis;
import cn.agiledata.bank.hibernateBean.SubAccount;
import cn.agiledata.bank.hibernateBean.Transaction;

public class EmailCancel extends NotifyMail {
    private String email;
    private String describe;
    private String cancelUrl;
    private String cancelCode;
    private String urlPath;
    private Date now;
    private Account account;
    
    protected SubAccount setMailContext(Map vnvMap, Transaction tran,
            ScoresHis score) {
        vnvMap.put("urlpath", getUrlPath());
        vnvMap.put("cancelcode", getCancelCode());
        vnvMap.put("cancelurl", getCancelUrl());
        vnvMap.put("describe", getDescribe());
        vnvMap.put("email", getEmail());
        vnvMap.put("now", DateUtil.date2String(Calendar.getInstance().getTime()));
        return getAccount().getDefaultSubAccount();
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public String getCancelCode() {
        return cancelCode;
    }

    public void setCancelCode(String cancelCode) {
        this.cancelCode = cancelCode;
    }

    public String getCancelUrl() {
        return cancelUrl;
    }

    public void setCancelUrl(String cancelUrl) {
        this.cancelUrl = cancelUrl;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUrlPath() {
        return urlPath;
    }

    public void setUrlPath(String urlPath) {
        this.urlPath = urlPath;
    }

    public Date getNow() {
        return now;
    }

    public void setNow(Date now) {
        this.now = now;
    }

}
